// app.js
import './utils/utils'
import './utils/http'

App({
  token: '',
  refreshToken: '',

  avatar: '',
  nickName: '',
  onLaunch () {
    this.getToken()
  },
  getToken () {
    this.token = wx.getStorageSync('token')
    this.refreshToken = wx.getStorageSync('refreshToken')
  },
  setToken (key, token) {
    this[key] = token
    wx.setStorageSync(key, token)
  },
  setUserInfo (key, val) {
    this[key] = val
  }
})
